* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    overflow: hidden;
    background: #000;
}

#night-sky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        #0a0a2e 0%, 
        #16213e 30%, 
        #1a1a3a 60%, 
        #000000 100%);
}

#starCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#fireworksCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: crosshair;
}

/* 控制面板样式 */
#control-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#control-panel.hidden {
    transform: translateX(350px);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: white;
}

.panel-header h3 {
    font-size: 18px;
    font-weight: 500;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.control-group {
    margin-bottom: 15px;
    color: white;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.control-group select,
.control-group input[type="range"] {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: white;
}

.control-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.control-group input[type="range"] {
    -webkit-appearance: none;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background: #4CAF50;
    cursor: pointer;
    border-radius: 50%;
}

/* 主控制按钮 */
#main-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

/* 节日祝福样式 */
#festival-greeting {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    pointer-events: none;
}

.greeting-text {
    font-size: 48px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: fadeInOut 3s ease-in-out;
    text-align: center;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0; transform: scale(1); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    #control-panel {
        width: 280px;
        top: 10px;
        right: 10px;
    }
    
    .greeting-text {
        font-size: 36px;
    }
    
    #main-controls {
        top: 10px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    #control-panel {
        width: 260px;
    }
    
    .greeting-text {
        font-size: 28px;
    }
}

/* 星星闪烁动画 */
@keyframes twinkle {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* 节能模式样式 */
body.eco-mode #fireworksCanvas {
    filter: brightness(0.8);
}

body.eco-mode .particle {
    opacity: 0.7;
}
